package com.gmp.product.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gmp.common.annotation.Excel;
import com.gmp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * 取样留样信息对象 sample_retention_info
 *
 * @author Koi
 * @date 2025-10-27
 */
@TableName(resultMap = "com.gmp.product.mapper.SampleRetentionInfoMapper.SampleRetentionInfoResult")
public class SampleRetentionInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 取样唯一标识
     */
    private String sampleId;

    /**
     * 留样唯一标识
     */
    private String retentionId;

    /**
     * 取样日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "取样日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sampleDate;

    /**
     * 取样流水号
     */
    @Excel(name = "取样流水号")
    private String orderId;

    /**
     * 取样类型（中间产品/物料/成品）
     */
    @Excel(name = "取样类型", readConverterExp = "中间产品/物料/成品")
    private Integer sampleType;

    /**
     * 物料代号
     */
    @Excel(name = "物料代号")
    private String materialCode;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String productName;

    /**
     * 保质期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shelfLife;

    /**
     * 批号
     */
    @Excel(name = "批号")
    private String batchNumber;

    /**
     * 生产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /**
     * 规格
     */
    @Excel(name = "规格")
    private String specification;

    /**
     * 来源（工序/供应商）
     */
    @Excel(name = "来源", readConverterExp = "工=序/供应商")
    private String source;



    /**
     * 检验项目URL
     */
    @Excel(name = "检验项目URL")
    private String itemsUrl;

    /**
     * 储存条件
     */
    @Excel(name = "储存条件")
    private String storageCondition;

    /**
     * 是否留样
     */
    @Excel(name = "是否留样")
    private Long isRetention;

    /**
     * 留样量
     */
    @Excel(name = "留样量")
    private String retentionQuantity;

    /**
     * 留样领用量
     */
    @Excel(name = "留样领用量")
    private String retentionUsedQuantity;

    /**
     * 留样剩余量（留样量-领用量）
     */
    @Excel(name = "留样剩余量", readConverterExp = "留=样量-领用量")
    private String retentionRemainingQuantity;

    /**
     * 稳定性留样量
     */
    @Excel(name = "稳定性留样量")
    private String stabilityRetentionQuantity;

    /**
     * 稳定性留样领用量
     */
    @Excel(name = "稳定性留样领用量")
    private String stabilityRetentionUsed;

    /**
     * 稳定性留样剩余量
     */
    @Excel(name = "稳定性留样剩余量")
    private String stabilityRetentionRemaining;

    /**
     * 留样至日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "留样至日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date retentionEndDate;

    /**
     * 稳定性留样至日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "稳定性留样至日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stabilityRetentionEndDate;

    /**
     * 留样创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "留样创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 取样人
     */
    @Excel(name = "取样人")
    private String sampler;

    /**
     * 留样人
     */
    @Excel(name = "留样人")
    private String retainer;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setSampleId(String sampleId) {
        this.sampleId = sampleId;
    }

    public String getSampleId() {
        return sampleId;
    }

    public void setRetentionId(String retentionId) {
        this.retentionId = retentionId;
    }

    public String getRetentionId() {
        return retentionId;
    }

    public void setSampleDate(Date sampleDate) {
        this.sampleDate = sampleDate;
    }

    public Date getSampleDate() {
        return sampleDate;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setSampleType(Integer sampleType) {
        this.sampleType = sampleType;
    }

    public Integer getSampleType() {
        return sampleType;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductName() {
        return productName;
    }

    public void setShelfLife(Date shelfLife) {
        this.shelfLife = shelfLife;
    }

    public Date getShelfLife() {
        return shelfLife;
    }

    public void setBatchNumber(String batchNumber) {
        this.batchNumber = batchNumber;
    }

    public String getBatchNumber() {
        return batchNumber;
    }

    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }

    public Date getProductionDate() {
        return productionDate;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSource() {
        return source;
    }



    public void setItemsUrl(String itemsUrl) {
        this.itemsUrl = itemsUrl;
    }

    public String getItemsUrl() {
        return itemsUrl;
    }

    public void setStorageCondition(String storageCondition) {
        this.storageCondition = storageCondition;
    }

    public String getStorageCondition() {
        return storageCondition;
    }

    public void setIsRetention(Long isRetention) {
        this.isRetention = isRetention;
    }

    public Long getIsRetention() {
        return isRetention;
    }

    public void setRetentionQuantity(String retentionQuantity) {
        this.retentionQuantity = retentionQuantity;
    }

    public String getRetentionQuantity() {
        return retentionQuantity;
    }

    public void setRetentionUsedQuantity(String retentionUsedQuantity) {
        this.retentionUsedQuantity = retentionUsedQuantity;
    }

    public String getRetentionUsedQuantity() {
        return retentionUsedQuantity;
    }

    public void setRetentionRemainingQuantity(String retentionRemainingQuantity) {
        this.retentionRemainingQuantity = retentionRemainingQuantity;
    }

    public String getRetentionRemainingQuantity() {
        return retentionRemainingQuantity;
    }

    public void setStabilityRetentionQuantity(String stabilityRetentionQuantity) {
        this.stabilityRetentionQuantity = stabilityRetentionQuantity;
    }

    public String getStabilityRetentionQuantity() {
        return stabilityRetentionQuantity;
    }

    public void setStabilityRetentionUsed(String stabilityRetentionUsed) {
        this.stabilityRetentionUsed = stabilityRetentionUsed;
    }

    public String getStabilityRetentionUsed() {
        return stabilityRetentionUsed;
    }

    public void setStabilityRetentionRemaining(String stabilityRetentionRemaining) {
        this.stabilityRetentionRemaining = stabilityRetentionRemaining;
    }

    public String getStabilityRetentionRemaining() {
        return stabilityRetentionRemaining;
    }

    public void setRetentionEndDate(Date retentionEndDate) {
        this.retentionEndDate = retentionEndDate;
    }

    public Date getRetentionEndDate() {
        return retentionEndDate;
    }

    public void setStabilityRetentionEndDate(Date stabilityRetentionEndDate) {
        this.stabilityRetentionEndDate = stabilityRetentionEndDate;
    }

    public Date getStabilityRetentionEndDate() {
        return stabilityRetentionEndDate;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setSampler(String sampler) {
        this.sampler = sampler;
    }

    public String getSampler() {
        return sampler;
    }

    public void setRetainer(String retainer) {
        this.retainer = retainer;
    }

    public String getRetainer() {
        return retainer;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("sampleId", getSampleId())
                .append("retentionId", getRetentionId())
                .append("sampleDate", getSampleDate())
                .append("orderId", getOrderId())
                .append("sampleType", getSampleType())
                .append("materialCode", getMaterialCode())
                .append("productName", getProductName())
                .append("shelfLife", getShelfLife())
                .append("batchNumber", getBatchNumber())
                .append("productionDate", getProductionDate())
                .append("specification", getSpecification())
                .append("source", getSource())
                .append("itemsUrl", getItemsUrl())
                .append("storageCondition", getStorageCondition())
                .append("isRetention", getIsRetention())
                .append("retentionQuantity", getRetentionQuantity())
                .append("retentionUsedQuantity", getRetentionUsedQuantity())
                .append("retentionRemainingQuantity", getRetentionRemainingQuantity())
                .append("stabilityRetentionQuantity", getStabilityRetentionQuantity())
                .append("stabilityRetentionUsed", getStabilityRetentionUsed())
                .append("stabilityRetentionRemaining", getStabilityRetentionRemaining())
                .append("retentionEndDate", getRetentionEndDate())
                .append("stabilityRetentionEndDate", getStabilityRetentionEndDate())
                .append("createdTime", getCreatedTime())
                .append("sampler", getSampler())
                .append("retainer", getRetainer())
                .append("remark", getRemark())
                .append("isDelete", getIsDelete())
                .toString();
    }
}

